home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / wnos5src.zip / ARCDUMP.C < prev    next >
Text File  |  1993-08-09  |  666b  |  39 lines

  1. #include "global.h"
  2. #include "config.h"
  3. #ifdef ARCNET
  4. #include "mbuf.h"
  5. #include "arcnet.h"
  6. #include "trace.h"
  7.  
  8. void
  9. arc_dump(FILE *fp,struct mbuf **bpp,int check)
  10. {
  11.     struct arc ahdr;
  12.  
  13.     ntoharc(&ahdr,bpp);
  14.  
  15.     trprintf(fp,"Arcnet: len %u %02x->%02x type ",
  16.         ARCLEN + len_p(*bpp),uchar(*ahdr.source),uchar(*ahdr.dest));
  17.  
  18.     switch(uchar(ahdr.type)){
  19.     case ARC_IP:
  20.         trprintf(fp,"IP\n");
  21.         ip_dump(fp,bpp,1);
  22.         break;
  23.     case ARC_ARP:
  24.         trprintf(fp,"ARP\n");
  25.         arp_dump(fp,bpp);
  26.         break;
  27.     default:
  28.         trprintf(fp,"0x%x\n",ahdr.type);
  29.         break;
  30.     }
  31. }
  32.  
  33. int
  34. arc_forus(struct iface *iface,struct mbuf *bp)
  35. {
  36.     return 1;
  37. }
  38.  
  39. #endif /* ARCNET */